27. Clean Up: All Resources

Clean up Resources

It is good practice to always clean up and delete any resources that you are no longer using. That is, after you complete an exercise, and you are done with predictions and data analysis, you should get rid of any:

  • Data source in S3 that you are no longer using
  • Endpoint configuration files that you no longer need
  • Endpoints that you will no longer use
  • CloudWatch logs that are no longer useful

Deleting Endpoints

In the notebook, we have usually included code to delete your endpoints after creating some predictions, for example:

# delete predictor endpoint
session.delete_endpoint(predictor.endpoint)

Thorough Clean up

You can find a link for instructions on cleaning up all your resources, in this documentation and I will go over some of these details, next.

  1. The endpoint configuration.
  2. The model.

Delete endpoint config files.

Delete endpoint config files.

Deleting models

Deleting models

Delete or empty your S3 bucket (empty is recommended until the end of the course, when you should delete this bucket entirely)

Delete or empty your S3 bucket (empty is recommended until the end of the course, when you should delete this bucket entirely)

At the end of this course, you may also choose to delete the entire notebook instance and IAM Role, but you may keep these as is, for now. In between lessons, if you are taking a break, you may want to Stop your notebook and pause it from continuously running.

Stopping the ML-case-studies notebook

Stopping the ML-case-studies notebook

Cleaning up resources at the end of an exercise or lesson is a great practice to get into!

IMPORTANT

To avoid incurring additional charges, it is suggested that you DELETE any unused notebooks and data resources on S3 and CloudWatch.